Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@textlint/kernel
Advanced tools
textlint kernel is core logic by pure JavaScript.
This module is a low layer of textlint.
No plugin, No rule, No filter rule by default.
Install with npm:
npm install @textlint/kernel
import { TextlintKernel } from "@textlint/kernel";
const kernel = new TextlintKernel();
const options = {
filePath: "/path/to/file.md",
ext: ".md",
plugins: [
{
pluginId: "markdown",
plugin: require("@textlint/textlint-plugin-markdown")
}
],
rules: [
{
ruleId: "no-todo",
rule: require("textlint-rule-no-todo").default
}
]
};
kernel.lintText("TODO: text", options).then(result => {
assert.ok(typeof result.filePath === "string");
assert.ok(result.messages.length === 1);
});
Notes: Preset is a collection of Rules.
Currently, presets
option does not exist.
@textlint/kernel
export core types of textlint.
If you use TypeScript, this types help you.
// Types
import {
TextlintResult,
TextlintFixResult,
TextlintFixCommand,
TextlintMessage,
// Kernel rule/filter/plugin format
TextlintKernelRule,
TextlintKernelFilterRule,
TextlintKernelPlugin,
// textlint rule interface
TextlintRuleCreator,
TextlintRuleOptions,
// textlint filter rule interface
TextlintFilterRuleCreator,
TextlintFilterRuleOptions,
// textlint plugin interface
TextlintPluginCreator,
TextlintPluginOptions,
TextlintPluginProcessor,
TextlintPluginProcessorConstructor
} from "@textlint/kernel";
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
textlint kernel is core logic by pure JavaScript.
The npm package @textlint/kernel receives a total of 57,007 weekly downloads. As such, @textlint/kernel popularity was classified as popular.
We found that @textlint/kernel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.